package net.mikoo.seals.api.model.company;

import net.mikoo.seals.api.model.BaseResponse;
import net.mikoo.seals.model.Company;

public class CurrentResponse extends BaseResponse {

	private static final long serialVersionUID = 2048145293829828639L;

	private CompanyInfo company;

	public CompanyInfo getCompany() {
		return company;
	}

	public void setCompany(CompanyInfo company) {
		this.company = company;
	}
	
	public static CurrentResponse valueOf(Company company) {
		CurrentResponse result = new CurrentResponse();
		if(company == null) {
			return result;
		}
		
		CompanyInfo companyInfo = new CompanyInfo();
		companyInfo.setCompanyId(company.getCompanyId());
		companyInfo.setCompanyName(company.getCompanyName());
		result.setCompany(companyInfo);
		
		return result;
	}
	
}
